/**
 * @author: yasen
 * @time: 2022/10/11 16:18
 * @email: yasen@yasenstudio.com
 */
package com.showdor.springboot;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class StudioSqlServerConnection {
    private Connection connection;

    public StudioSqlServerConnection() {
/*        Properties properties = new Properties();
        try {
            properties.load(new FileReader("classpath:db.properties"));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }*/
        Connection conn = null;
        try {
            conn = DriverManager.getConnection("jdbc:sqlserver://192.168.139.97:2433;databaseName=dw_test", "dwuser", "HTgx_2021");
            this.connection = conn;
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }

    public Connection getConnection() {
        return connection;
    }
}
